<template>
    <div id="addCommuntiy" :style="`height:${height}`">
        <van-nav-bar
        right-text="发布"
        left-arrow
        @click-left="onClickLeft"
        @click-right="onClickRight"
        />

        <van-field
        v-model="message"
        rows="6"
        autosize
        type="textarea"
        placeholder=""
        :border=true
        show-word-limit=true
        :maxlength=200
        />
        <div class="img_list">
        <van-uploader v-model="fileList" multiple  max-count="6" :after-read="redFile"/>
        </div>
    </div>
</template>

<script>
export default {
    data(){
        return{
            height:'',
            message:'',
            fileList:[]

        }
    },
    methods:{
        redFile(event){
            console.log(event)
        },
        onClickLeft(){
            window.history.go(-1)
        },
        onClickRight(){
            this.$Toast("发布成功")
        }
    },

    created(){
        this.height=window.innerHeight+"px"
    }
}
</script>

<style scoped>
    #addCommuntiy{
        background: white;
        width: 100%;
    }
    .img_list{
        margin: .6rem 3rem
    }
</style>